<script>
import AppHeader from '@/components/app-header.vue';
import AppTopnav from '@/components/app-topnav.vue'
import AppFooter from "@/components/app-footer.vue"
import { useStore } from "vuex"

export default {
    name: 'Layout',
    components: {
        AppTopnav,
        AppHeader,
        AppFooter
    },
    setup(){
        const store = useStore()
        store.dispatch('category/getList')
    }
}
</script>

<template>
    <AppTopnav />
    <AppHeader />
    <main class="app-body">
        <!-- 二级路由 -->
        <router-view></router-view>
    </main>
    <AppFooter />
</template>

<style scoped lang="less">
.app-body {
  min-height: 600px;
}
</style>